<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
$itemId = $_REQUEST['itemVal'];
$sizeId = $_REQUEST['sizeVal'];

$companyArry = array();
$j = 0;
echo $selectSize = "SELECT company.companyId,company.companyName
                 FROM company
                 JOIN subItem ON subItem.companyId = company.companyId
                WHERE itemId = ".$_REQUEST['itemVal']." 
                  AND sizeId = ".$_REQUEST['sizeVal']."
                ORDER BY companyName";
$selectSizeResult = mysql_query($selectSize);
while($companyRow = mysql_fetch_array($selectSizeResult))
{
	$companyArry['companyId']   = $companyRow['companyId'];
	$companyArry['companyName'] = $companyRow['companyName'];
	$j++;
}
include("./bottom.php");
$smarty->assign('companyArry',$companyArry);
$smarty->display('ajexResponceSize.tpl');
?>